/*
    版权声明：
    vla.h由郑合适（fall708）编写
    本意是为了方便大家不受慢的要命的STL困扰
    github：https://github.com/fall708/LightSTL
*/
#pragma once
#pragma code_seg("light_stl_vla")
typedef int msg;
enum msgcase
{
    success,fail
};

template<typename all>
class vla
{
private:
    all *data;
    long len;
    long capacity;
public:
    vla()
    {
        this->data=new all[8];
        this->len=0;
        this->capacity=8;
    }
    ~vla()
    {
        delete[] this->data;
        this->len=0;
        this->capacity=0;
    }
    friend msg copy(vla,vla);
    long use_len();
    long use_capacity();
    //TODO:28日继续实现push_back(),insert(),erase()
    msg push_back(all);
    msg insert(all,int);
    msg erase(int);
    msg erase(int,int);
    msg fit(int);
    all& operator [] (int point);
    /*
    原型：
        push_back(T initdata[])
        insert(T initdata[])
        erase(int erasepoint)
        erase(int spoint,int epoint) 
    */
};





